package com.aorise.model.bayonet;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;
import org.springframework.web.bind.annotation.PathVariable;

import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * @Auther: zhouhao
 * @Date: 2019/6/19
 * @Description: 添加卡口Model
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value="addBayonet对象",description="添加卡口")
public class BayonetModel {

    @ApiModelProperty(value = "卡口名称",example = "1",dataType = "String")
    @NotNull(message = "卡口名称不能为空")
    @Length(min = 1,max = 30,message = "卡口名称不能为空且长度需要在1和20之间")
    private String baName;

    @ApiModelProperty(value = "卡口编码",example = "1",dataType = "String")
    @NotNull(message = "卡口编码不能为空")
    @Length(min = 1,max = 20,message = "卡口编码不能为空且长度需要在1和20之间")
    private String baNumber;

    @ApiModelProperty(value = "卡口类型",example = "1",dataType = "int")
    @NotNull(message = "卡口类型不能为空")
    private Integer baType;

    @ApiModelProperty(value = "所属分组",example = "1",dataType = "String")
    private String group;

    @ApiModelProperty(value = "所属分组Id",example = "1",dataType = "int")
    private Integer groupId;

    @ApiModelProperty(value = "经度",example = "27.5262345414",dataType = "String")
    private String longitude;

    @ApiModelProperty(value = "纬度",example = "109.9526119244",dataType = "String")
    private String latitude;

    @ApiModelProperty(value = "车道数",example = "1",dataType = "int")
    private Integer laneSum;

    @ApiModelProperty(value = "车道详情",example = "1",dataType = "list")
    List<BayonetLaneModel> bayonetLane;

    @ApiModelProperty(value = "连接状态",dataType = "int",hidden = true)
    private Integer online;

    @ApiModelProperty(value = "是否删除状态",dataType = "int",hidden = true)
    private Integer state;

    @ApiModelProperty(value = "创建人",dataType = "int",hidden = true)
    private Integer createUser;

    @ApiModelProperty(value = "更新人",dataType = "int",hidden = true)
    private Integer editUser;

    @ApiModelProperty(value = "主键(卡口ID,编辑卡口的时候需要传入)",example = "1",dataType = "int")
    private Integer id;

}
